package com.example.footballsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.footballsystem.entity.Team;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TeamMapper extends BaseMapper<Team> {
    @Select("select * from team")
    public List<Team> getAllTeam();
    @Insert("insert into team (teamName, homefield, country, teamID) VALUES (#{teamName},#{homeField},#{country},#{teamID})")
    public Boolean addTeam(Team team);
    @Delete("delete from team where teamID=#{id}")
    public Boolean deleteTeam(int id);
}
